import { Component, Inject, ViewChild } from "@angular/core";
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { DesignFormBuildComponent } from "../../preview-form-design/design-form-build/design-form-build.component";

@Component({
  // eslint-disable-next-line
  selector: 'app-preview-dialog',
  templateUrl: './preview-dialog.dialog.html',
  styleUrls: ['./preview-dialog.dialog.scss'],
})
// eslint-disable-next-line
export class PreviewDialog {
  test = {
    "batch_1653203331894":[{"input_1653203333524":"444","textarea_1653203334997":"55","number_1653203336708":5},{"input_1653203333524":'333',"textarea_1653203334997":"222","number_1653203336708":null}],
    "checkbox_1653373399369":["1"],
   // "input_1653376660294":"4"
  }

  @ViewChild('formBuild') formBuild: DesignFormBuildComponent;
  constructor(
      public dialogRef: MatDialogRef<PreviewDialog>,
      @Inject(MAT_DIALOG_DATA) public data
  ) {

  }

  valid() {
    this.formBuild.checkValid();
  }
}